#include<iostream>
using namespace std;
int main(){
	int n,g,s,b;
	scanf("%d",&n);
	g=n%10;
	s=n/10%10;
	b=n/100;
	printf("%d %d %d\n",g,s,b);
	return 0;
} 
